package com.ideaplugin.datamanager.model.request;

import com.base.param.WhereParam;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *
 * </p>
 *
 * @author zhaojingbo
 * @since 2023-05-25
 */
@Data
public class TableConfigParam implements Serializable {
    @NotNull
    private Long tableInfoId;
    private List<AddDataConfig> addDataConfigs;

    private List<WhereParam> selectColumnDefaultValue;

    public enum DataOperation {
        // curd
        add, delete, edit, show,
        ;
    }

    @Data
    public static class AddDataConfig {
        private int rowNum;
        //private String columnCode;
        //private ElementType elementType;
        Map<String, ElementType> rowInfo;
    }

    public enum ElementType {
        input, file, multi_select;
    }


    @Data
    public static class SelectDataConfig {
        private Map<DataOperation, Boolean> operation;
        private Map<String, String> columnDefaultValue;
    }

    public static void main(String[] args) {


    }

}
